#ifndef MAIN_H
#define MAIN_H

// #include"TM4C123.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include <stdarg.h>
#include <string.h>

#include "inc/tm4c123gh6pm.h"
#include "inc/hw_memmap.h" //鐩存帴浣跨敤瀵勫瓨鍣ㄥご鏂囦欢绫诲瀷
#include "inc/hw_types.h"
#include "inc/hw_ints.h"
#include "inc/hw_gpio.h"
#include "inc/hw_sysctl.h"

#include "driverlib/debug.h"
#include "driverlib/fpu.h"
#include "driverlib/gpio.h"
#include "driverlib/pwm.h"
#include "driverlib/interrupt.h"
#include "driverlib/sysctl.h"
#include "driverlib/systick.h"
#include "driverlib/gpio.h"
#include "driverlib/pin_map.h"
#include "driverlib/rom.h"
#include "driverlib/rom_map.h"

#include "Lily/Lily_help.h"




#define sends_buff_len 256
#define tick_peroid (80000 - 1) //1ms



#define encoder_port GPIO_PORTC_BASE
#define encoder_a1 GPIO_PIN_4
#define encoder_b1 GPIO_PIN_5
#define encoder_a2 GPIO_PIN_6
#define encoder_b2 GPIO_PIN_7

extern int c1, c2;
void init_uart0();
void systick_int();
float millisf();
void sends(const char *s);
void init_pwm(float freq, float duty);
void led_rgb(float r, float g, float b);
int encoder_do_count();
void init_flash();
int task_rx_fifo_monitor();
void init_adc();
void init_timer();
void init_adc_dma();
void seta(float ang);
int cmd_reg_set(int n, char *arg[]);

#endif